local hj_gongshi = fk.CreateSkill {
  name = "hj_gongshi",
  tags = { Skill.Compulsory, },
}

hj_gongshi:addEffect(fk.TargetSpecifying, {
  anim_type = "support",
  priority = 2,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(hj_gongshi.name) and not player.dead and data.card.trueName == "slash" and player == target and
    math.random() < 0.5
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    data.additionalDamage = (data.additionalDamage or 0) + 1
    -- local targets = U.getUseExtraTargets(room, data)
    -- if #targets == 0 then return false end
    -- local tars = #table.filter(player.player_cards[Player.Hand],function(cid) return Fk:getCardById(cid).trueName == "slash" end)
    -- local tos = room:askForChoosePlayers(player, targets, 1, tars, nil, hj_gongshi.name, true)
    -- if #tos > 0 then
    --   table.forEach(tos, function (id)
    --     TargetGroup:pushTargets(data.targetGroup, id)
    --   end)
    -- end
  end,
})

hj_gongshi:addEffect("atkrange", {
  correct_func = function(self, from, to)
    if from:hasSkill(hj_gongshi.name) then
      return 5
    end
  end,
})

return hj_gongshi
